package top.dotgo.model.pt;

import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.annotations.GenericGenerator;
import top.dotgo.model.IBaseEntity;

import javax.persistence.*;

/**
 * 平台 组织机构(PtOrg)实体类
 *
 * @author jornl
 * @date 2020-05-21 00:03:49
 */
@Entity
@Data
@Accessors(chain = true)
@Table(name = "pt_org")
public class PtOrgEntity implements IBaseEntity, Serializable {
       /**
     * 组织机构ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "custom-id")
    @GenericGenerator(name = "custom-id", strategy = "top.dotgo.model.kit.CustomIDGenerator")
     @Column(name = "org_id")
     private Long orgId;
    
    /**
     * 上级机构
     */
     @Column(name = "p_id")
     private Long pId;
    
    /**
     * 上级机构的id列表
     */
     @Column(name = "p_list")
     private String pList;
    
    /**
     * 机构名称
     */
     @Column(name = "org_name")
     private String orgName;
    
    /**
     * 部门领导 id
     */
     @Column(name = "leader_id")
     private Long leaderId;
    
    /**
     * 排序 序号
     */
     @Column(name = "sort")
     private Integer sort;
    
    /**
     * 归属总公司
     */
     @Column(name = "top_company_id")
     private Long topCompanyId;
    
    /**
     * 归属公司
     */
     @Column(name = "company_id")
     private Long companyId;
    
    /**
     * 机构类型  0总公司,1分子公司,2部门 
     */
     @Column(name = "org_type")
     private Integer orgType;
    
    /**
     * 创建人
     */
     @Column(name = "create_by")
     private Long createBy;
    
    /**
     * 创建时间
     */
     @Column(name = "create_time")
     private Date createTime;
    
    /**
     * 修改人
     */
     @Column(name = "edit_by")
     private Long editBy;
    
    /**
     * 修改时间
     */
     @Column(name = "edit_time")
     private Date editTime;
    
    
     @Column(name = "del_by")
     private Long delBy;
    
    
     @Column(name = "del_time")
     private Date delTime;
    
    /**
     * 状态：0停用，1启用
     */
     @Column(name = "status")
     private Integer status;
    


}